#region Imported Namespaces


using System;
using System.Runtime.InteropServices;


#endregion


namespace WtfManager.WindowsNative.Shell32
{
  [ComImport]
  [InterfaceType(ComInterfaceType.InterfaceIsIUnknown)]
  [Guid("000214E6-0000-0000-C000-000000000046")]
  public interface IShellFolder
  {
    [PreserveSig]
    Int32 ParseDisplayName(IntPtr hwnd, IntPtr pbc, [MarshalAs(UnmanagedType.LPWStr)] string pszDisplayName,
                           ref UInt32 pchEaten, out IntPtr ppidl, ref SFGAO pdwAttributes);


    [PreserveSig]
    Int32 EnumObjects(IntPtr hwnd, SHCONTF grfFlags, out IEnumIDList ppenumIDList);


    [PreserveSig]
    Int32 BindToObject(IntPtr pidl, IntPtr pbc, ref Guid riid, out IntPtr ppv);


    [PreserveSig]
    Int32 BindToStorage(IntPtr pidl, IntPtr pbc, ref Guid riid, out IntPtr ppv);


    [PreserveSig]
    Int32 CompareIDs(SHCIDS lParam, IntPtr pidl1, IntPtr pidl2);


    [PreserveSig]
    Int32 CreateViewObject(IntPtr hwndOwner, ref Guid riid, out IShellView ppv);


    [PreserveSig]
    Int32 GetAttributesOf(UInt32 cidl, [MarshalAs(UnmanagedType.LPArray, SizeParamIndex = 0)] IntPtr[] apidl,
                          ref SFGAO rgfInOut);


    [PreserveSig]
    Int32 GetUIObjectOf(IntPtr hwndOwner, uint cidl, [MarshalAs(UnmanagedType.LPArray)] IntPtr[] apidl, ref Guid riid,
                        IntPtr rgfReserved, out IntPtr ppv);


    [PreserveSig]
    Int32 GetDisplayNameOf(IntPtr pidl, SHGDN uFlags, IntPtr lpName);


    [PreserveSig]
    Int32 SetNameOf(IntPtr hwnd, IntPtr pidl, [MarshalAs(UnmanagedType.LPWStr)] string pszName, UInt32 uFlags,
                    out IntPtr ppidlOut);
  }
}